package com.hmkx.solr.query;


import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.queries.CustomScoreProvider;
import org.apache.lucene.queries.CustomScoreQuery;
import org.apache.lucene.search.Query;

import java.io.IOException;

/**
 * @Author hht
 * @Description //TODO 
 * @Date 14:32 2019/7/24
 * @Param 
 * @return 
 **/
public class HmkxQuery extends CustomScoreQuery {

    public HmkxQuery(Query subQuery) {
        super(subQuery);
    }

    @Override
    protected CustomScoreProvider getCustomScoreProvider(LeafReaderContext context) throws IOException {
        //此处返回，定义的Provider
        HmkxProvider provider=new HmkxProvider(context);
        return provider;
    }
}
